//C7:ep_7_5.c
// find the max elemnt
#include <stdio.h>
int main(void)
{
    int i,j;
    int row = 0, col = 0;
    int max;
    int a[3][4] = 
    {
        {1,2,3,4},
        {9,8,7,6},
        {-10,10,-5,2}
    };

    max = a[0][0];
    for(i = 0; i <= 2; i++)
    {
        for(j = 0; j <= 3; j++)
        {
            if(a[i][j] > max)
            {
                max = a[i][j];
                row = i;
                col = j;
            }
        }
    }
    printf("max = %d, row = %d, col = %d\n", max, row, col);
}